<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */

$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?>
<!DOCTYPE html>
<html>
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo 'Blog demo' ?>
		
	</title>
	 <meta name="viewport" content="width=device-width, initial-scale=1.0">
	 <script src="http://code.jquery.com/jquery.js"></script>
     <script src="bootstrap.min.js"></script>
	<?php
		echo $this->Html->meta('icon');
        
        echo $this->Html->css('cake.generic');
		echo $this->Html->css('bootstrap');
        echo $this->Html->css('bootstrap.min');
        
       
        
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
	<style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>
</head>
<body>
	
		<div class="navbar navbar-inverse navbar-fixed-top">
		    <div class="navbar-inner">
		       <div class="container">
			     <a class='brand' href='#'>Blog demo page </a>
			     <ul class='nav'>
			        <li> <?php echo $this->Html->link('Homepage',array('controller'=>'posts','action'=>'index'))?> </li>
			     </ul>
			   </div>
			</div>
			
		</div>
		
	
	<div class="container" >

		    <p color='white' class='text-right'>
		      <?php echo '<br>'?>
              <?php if($logged_in): ?>
                 Welcome, <?php echo $users_username; echo " "; echo $this->Html->link('Logout',array('controller'=>'users','action'=>'logout')); ?>
              <?php else: ?>
                <?php echo $this->Html->link('Register',array('controller'=>'users','action'=>'signup')); ?> or
                <?php echo $this->Html->link('Login',array('controller'=>'users','action'=>'login')); ?>
              <?php endif; ?>

            </p>
            
            
              
			<?php echo $this->Session->flash(); ?>
			
			
            
			<?php echo $this->fetch('content'); ?>
			


	</div>
	
</body>
</html>
